home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / Found / FWString / FWBndStr.h < prev    next >
Encoding:
Text File  |  1996-09-17  |  3.0 KB  |  114 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWBndStr.cpp
  4. //    Release Version:    $ ODF 2 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef FWBNDSTR_H
  11. #define FWBNDSTR_H
  12.  
  13. #ifndef FWPSTR_H
  14. #include "FWPStr.h"
  15. #endif
  16.  
  17. //========================================================================================
  18. //    CLASS FW_CString32
  19. //========================================================================================
  20.  
  21. class FW_CString32 : public FW_CString
  22. {
  23. public:
  24.  
  25.     FW_DECLARE_CLASS
  26.     FW_DECLARE_AUTO(FW_CString32)
  27.     
  28.     virtual ~FW_CString32();
  29.     FW_CString32();
  30.     FW_CString32(const FW_CString32& other);
  31.     FW_CString32(const FW_CString& string);
  32.     FW_CString32(const FW_Char *bytes, FW_ByteCount numberBytes);
  33.     FW_CString32(const FW_Char *items);
  34.     
  35.     FW_CString32& operator=(const FW_CString32& other);
  36.     FW_CString32& operator=(ODIText* text);
  37.     FW_CString32& operator=(const char* string);
  38.  
  39. //----------------------------------------------------------------------------------------
  40. // Streaming
  41. public:
  42.  
  43.     static void* Read(FW_CReadableStream& stream, FW_ClassTypeConstant type);
  44.  
  45. private:
  46.     unsigned char fBuffer[36];
  47. };
  48.  
  49. //----------------------------------------------------------------------------------------
  50. // Inline functions
  51. //----------------------------------------------------------------------------------------
  52.  
  53. inline FW_CString32& FW_CString32::operator=(ODIText* text)
  54. {
  55.     ReplaceAll(text);
  56.     return *this;
  57. }
  58.  
  59. inline FW_CString32& FW_CString32::operator=(const char* string)
  60. {
  61.     ReplaceAll(string);
  62.     return *this;
  63. }
  64.  
  65. //========================================================================================
  66. //    CLASS FW_CString255
  67. //========================================================================================
  68.  
  69. class FW_CString255 : public FW_CString
  70. {
  71. public:
  72.  
  73.     FW_DECLARE_CLASS
  74.     FW_DECLARE_AUTO(FW_CString255)
  75.     
  76.     virtual ~FW_CString255();
  77.     FW_CString255();
  78.     FW_CString255(const FW_CString255& other);
  79.     FW_CString255(const FW_CString& string);
  80.     FW_CString255(const FW_Char *bytes, FW_ByteCount numberBytes);
  81.     FW_CString255(const FW_Char *items);
  82.     
  83.     FW_CString255& operator=(const FW_CString255& other);
  84.     FW_CString255& operator=(ODIText* text);
  85.     FW_CString255& operator=(const char* string);
  86.     
  87. //----------------------------------------------------------------------------------------
  88. // Streaming
  89. public:
  90.  
  91.     static void* Read(FW_CReadableStream& stream, FW_ClassTypeConstant type);
  92.  
  93. private:
  94.     unsigned char fBuffer[260];
  95. };
  96.  
  97. //----------------------------------------------------------------------------------------
  98. // Inline functions
  99. //----------------------------------------------------------------------------------------
  100.  
  101. inline FW_CString255& FW_CString255::operator=(ODIText* text)
  102. {
  103.     ReplaceAll(text);
  104.     return *this;
  105. }
  106.  
  107. inline FW_CString255& FW_CString255::operator=(const char* string)
  108. {
  109.     ReplaceAll(string);
  110.     return *this;
  111. }
  112.  
  113. #endif
  114.